sgdk: sound.h Source File

sgdk

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

sound.h
Go to the documentation of this file.

    00001
    00043 #ifndef _SOUND_H_
    00044 #define _SOUND_H_
    00045
    00046
    00051 #define SOUND_PCM_CH_AUTO   0x00
    00052
    00057 #define SOUND_PCM_CH1       Z80_DRV_CH0_SFT
    00058
    00062 #define SOUND_PCM_CH2       Z80_DRV_CH1_SFT
    00063
    00067 #define SOUND_PCM_CH3       Z80_DRV_CH2_SFT
    00068
    00072 #define SOUND_PCM_CH4       Z80_DRV_CH3_SFT
    00073
    00078 #define SOUND_PCM_CH1_MSK   Z80_DRV_CH0
    00079
    00083 #define SOUND_PCM_CH2_MSK   Z80_DRV_CH1
    00084
    00088 #define SOUND_PCM_CH3_MSK   Z80_DRV_CH2
    00089
    00093 #define SOUND_PCM_CH4_MSK   Z80_DRV_CH3
    00094
    00100 #define SOUND_RATE_32000    0
    00101
    00106 #define SOUND_RATE_22050    1
    00107
    00111 #define SOUND_RATE_16000    2
    00112
    00117 #define SOUND_RATE_13400    3
    00118
    00122 #define SOUND_RATE_11025    4
    00123
    00128 #define SOUND_RATE_8000     5
    00129
    00134 #define SOUND_PAN_LEFT      0x80
    00135
    00139 #define SOUND_PAN_RIGHT     0x40
    00140
    00144 #define SOUND_PAN_CENTER    0xC0
    00145
    00146
    00147 // Z80_DRIVER_PCM
    00148
    00156 u8   SND_isPlaying_PCM();
    00185 void SND_startPlay_PCM(const u8 *sample, const u32 len, const u8 rate, const u8 pan, const u8 loop);
    00191 void SND_stopPlay_PCM();
    00192
    00193
    00194 // Z80_DRIVER_2ADPCM
    00195
    00212 u8 SND_isPlaying_2ADPCM(const u16 channel_mask);
    00232 void SND_startPlay_2ADPCM(const u8 *sample, const u32 len, const u16 channel, const u8 loop);
    00243 void SND_stopPlay_2ADPCM(const u16 channel);
    00244
    00245
    00246 // Z80_DRIVER_4PCM_ENV
    00247
    00266 u8   SND_isPlaying_4PCM_ENV(const u16 channel_mask);
    00288 void SND_startPlay_4PCM_ENV(const u8 *sample, const u32 len, const u16 channel, const u8 loop);
    00301 void SND_stopPlay_4PCM_ENV(const u16 channel);
    00315 void SND_setVolume_4PCM_ENV(const u16 channel, const u8 volume);
    00330 u8   SND_getVolume_4PCM_ENV(const u16 channel);
    00331
    00332
    00333 // Z80_DRIVER_MVS
    00334
    00342 u8 SND_isPlaying_MVS();
    00353 void SND_startPlay_MVS(const u8 *music, const u8 loop);
    00358 void SND_stopPlay_MVS();
    00363 void SND_setTempo_MVS(u8 tempo);
    00364
    00375 void SND_startDAC_MVS(const u8 *sample, u16 size);
    00380 void SND_stopDAC_MVS();
    00381
    00389 u8 SND_isPlayingPSG_MVS();
    00397 void SND_startPSG_MVS(const u8 *music);
    00402 void SND_stopPSG_MVS();
    00410 void SND_enablePSG_MVS(u8 chan);
    00418 void SND_disablePSG_MVS(u8 chan);
    00419
    00420
    00421 // Z80_DRIVER_TFM
    00422
    00430 void SND_startPlay_TFM(const u8 *song);
    00435 void SND_stopPlay_TFM();
    00436
    00437
    00438 // Z80_DRIVER_VGM
    00439
    00444 u8 SND_isPlaying_VGM();
    00452 void SND_startPlay_VGM(const u8 *song);
    00457 void SND_stopPlay_VGM();
    00462 void SND_resumePlay_VGM();
    00463
    00468 void SND_playSfx_VGM(const u8 *sfx, u16 len);
    00469
    00470
    00471 // Z80_DRIVER_XGM
    00472
    00477 u8 SND_isPlaying_XGM();
    00485 void SND_startPlay_XGM(const u8 *song);
    00490 void SND_stopPlay_XGM();
    00495 void SND_resumePlay_XGM();
    00496
    00515 u8 SND_isPlayingPCM_XGM(const u16 channel_mask);
    00534 void SND_setPCM_XGM(const u8 id, const u8 *sample, const u32 len);
    00552 void SND_setPCMFast_XGM(const u8 id, const u8 *sample, const u32 len);
    00570 void SND_startPlayPCM_XGM(const u8 id, const u8 priority, const u16 channel);
    00583 void SND_stopPlayPCM_XGM(const u16 channel);
    00590 u16 SND_getCPULoad_XGM();
    00591
    00592
    00593 #endif // _SOUND_H_

All Classes Files Functions Variables Typedefs Enumerations Defines